(ns acst.config.error-config
  (:use [acst.utils.core]))


(deferror articles-error
          {:articles-not-found "无文章搜索结果"
           :update-article-failed "文章更新失败"
           :delete-article-failed "文章删除失败"})

(deferror blogs-error
          {:blog-not-active "未激活博客"
           :blog-not-found "无博客搜索结果"})

(deferror activities-error
          {:activities-not-found "无活动搜索结果"
           :insert-activity-failed "活动添加失败"
           :delete-activity-failed "活动删除失败"
           :update-activity-failed "活动更新失败"})

(deferror users-error
          {:not-login "请先登陆"
           :not-admin "你不是我儿子"
           :user-not-register "用户尚未注册"
           :username-already-used "用户名已被使用"
           :password-error "密码或用户名错误"})

(deferror roles-error
          {:role-not-found "无此角色"})


(deferror sql-error
          {:neg-limit "每页显示数量不能为负数"
           :neg-page "页数不能为负数"})

(deferror memos-error
          {:memo-not-found "留言不存在"
           :add-memo-failed "留言添加失败"
           :delete-memo-failed "留言删除失败"})

(deferror comments-error
          {:comment-not-found "目前尚无评论"
           :reply_not_found "目前尚无回复"
           :comment-failed "评论失败"
           :can-not-reply "需要回复的评论不存在"})


(deferror forms-constraint-error
          {:not-a-map "定义结构类型错误,只接受map"
           :invalid-name "字段名非法(只允许[0-9A-Za-z])"
           :invalid-key "含有不支持的键"
           :invalid-unique-name "字段名重复了"
           :invalid-desc "描述为空或非法(含有非法字符)"
           :invalid-notnull "必选字段类型错误"
           :invalid-length "长度逻辑或类型错误"
           :invalid-regex "非法正则表达式"
           :constraint-not-found "此活动报名未开启"
           :create-form-constraint-faile "活动报名表单约束添加失败"
           :update-form-constraint-faile "活动报名表单约束更新失败"
           :delete-form-constraint-failed "活动报名删除失败"})

(deferror entry-form-error
          {:not-allow-keys "含有不支持的条目"
           :invalid-notnull-value "必填字段未填写"
           :invalid-length-value "条目长度限制"
           :invalid-regex-value "信息不符合规则限制"
           :without-any-entry-form "还没有人报名"})

(deferror news-error
          {:new-not-found "新闻不存在"
           :add-news-failed "新闻发布失败"
           :delete-news-failed "删除新闻失败"})